Imports System
Imports System.Collections.Generic

Namespace OpenArchive
    Namespace Document
        Namespace Components

            ''' <summary> 
            ''' Contains a list of MIME Types. 
            ''' </summary> 
            Public Class MimeTypes
                Inherits Dictionary(Of String, String)
                Public Sub New()
                    Init()
                End Sub

                ''' <summary> 
                ''' Initializes the list of the MIME Types, with the most common media types. 
                ''' </summary> 
                Private Sub Init()

                    ' Images 
                    Add("jpg", "image/jpeg")
                    Add("jpeg", "image/jpeg")
                    Add("jpe", "image/jpeg")
                    Add("gif", "image/gif")
                    Add("png", "image/png")
                    Add("bmp", "image/bmp")
                    Add("tif", "image/tiff")
                    Add("tiff", "image/tiff")
                    Add("svg", "image/svg+xml")
                    Add("ico", "image/x-icon")

                    ' Text 
                    Add("txt", "text/plain")
                    Add("htm", "text/html")
                    Add("html", "text/html")
                    Add("xhtml", "text/xhtml")
                    Add("xml", "text/xml")
                    Add("xsl", "text/xsl")
                    Add("dtd", "application/xml-dtd")
                    Add("css", "text/css")
                    Add("rtf", "text/rtf")

                    ' Archives 
                    Add("zip", "application/zip")
                    Add("tar", "application/x-tar")

                    ' Multimedia 
                    Add("ogg", "application/ogg")
                    Add("swf", "application/x-shockwave-flash")
                    Add("mpga", "audio/mpeg")
                    Add("mp2", "audio/mpeg")
                    Add("mp3", "audio/mpeg")
                    Add("m3u", "audio/x-mpegurl")
                    Add("ram", "audio/x-pn-realaudio")
                    Add("ra", "audio/x-pn-realaudio")
                    Add("rm", "application/vnd.rn-realmedia")
                    Add("wav", "application/x-wav")
                    Add("mpg", "video/mpeg")
                    Add("mpeg", "video/mpeg")
                    Add("mpe", "video/mpeg")
                    Add("mov", "video/quicktime")
                    Add("qt", "video/quicktime")
                    Add("avi", "video/x-msvideo")

                    ' Other 
                    Add("pdf", "application/pdf")
                    Add("ai", "application/postscript")
                    Add("ps", "application/postscript")
                    Add("eps", "application/postscript")
                    Add("doc", "application/msword")
                    Add("unknown", "application/octet-stream")
                End Sub
            End Class
        End Namespace
    End Namespace
End Namespace